import {
  post,
  get,
  put,
  dalete,
  postJosn,
  putone,
  patch,
  patchJson,
  daleteJson
} from "../utils/request";
let host = "";


//设备接入设备类型
const deviceManage = host + "/api/tour-service/v1/deviceManage";
//设备刷新
const cameraApi = host + "/api/store-service/v1/cameraApi";
//获取门店列表
const organization = host + "/api/user-service/v1/organization";

import qs from "qs";

//查询所有设备类型(列表)
export function queryAllDeviceType(data) {
  return get(`${deviceManage}/queryAllDeviceType`);
}
//根据组织编码查询门店设备信息
export function queryDeviceManage(data) {
  return post(`${deviceManage}/queryDeviceManage`, data);
}
//设备刷新
export function refresh(data) {
  return post(`${deviceManage}/deviceRefresh`, data);
}
//修改设备使用状态
export function updateDeviceState(data) {
  return get(`${deviceManage}/updateDeviceState?${qs.stringify(data)}`);
}
//添加设备
export function addDevice(data) {
  return post(`${deviceManage}/addDevice`, data);
}
//修改设备信息
export function updateDeviceInfo(data) {
  return post(`${deviceManage}/updateDeviceInfo`, data);
}
//获取门店列表
export function queryOrgChildById(data) {
  return get(`${organization}/queryOrgChildById?${qs.stringify(data)}`);
}
//查询所有设备类型(分页)
export function queryAllType(data) {
  return post(`${deviceManage}/queryAllType`, data);
}
//添加设备类型
export function addDeviceType(data) {
  return post(`${deviceManage}/addDeviceType`, data);
}
//修改设备类型信息
export function updateDeviceType(data) {
  return post(`${deviceManage}/updateDeviceType`, data);
}
//修改设备类型使用状态
export function updateDeviceTypeState(data) {
  return get(`${deviceManage}/updateDeviceTypeState?${qs.stringify(data)}`);
}
//获取设备统计信息
export function getDevicesSatistics(data) {
  return get(`${deviceManage}/getDevicesSatistics?${qs.stringify(data)}`);
}
//获取设备信息
export function getDeviceInfo(data) {
  return get(`${deviceManage}/getDeviceInfo?${qs.stringify(data)}`);
}
//删除设备类型
export function deleteDeviceType(data) {
  return post(`${deviceManage}/deleteDeviceType?${qs.stringify(data)}`);
}
